{literal}
<h2>Annotation</h2>
@orm plugin DomArDate($DEFAULT_DATE)<br>
<br>
$DEFAULT_DATE can be anything acceptable to PHP strtotime!<br>

<h2>Methods</h2>
Useful image methods:<br>
<ul>
	<li> date( $format ) - formats date. See PHP date function.</li>
	<li> inFuture() - if date is in future.</li>
	<li> inPast() - if date is in past </li>
	<li> istoday() - if date is today </li>
	<li> isNull() - if date has no value.(NULL)</li>
	<li> day() - day part of the date </li>
	<li> month() - month part of the date</li>
	<li> year() - year part of the date</li>
	<li> stamp() - return Unix timestamp of the date.</li>
</ul>
<h2> Sample usage </h2>
<pre class="code">
&lt;?php
class MySampleClass extends DomArObject {
	/**
	* @orm plugin DomArDate(now)
	*/
	protected $date
}

$sample = new MySampleClass();
echo $sample->date->date().'&lt;br&gt;'; // prints todays date year-month-day
echo $sample->date->date('d-m-Y').'&lt;br&gt;'; // prints todays date day-month-year
echo ($sample->date->inFuture() ? 'In future' : 'Today or past').'&lt;br&gt;';
echo $sample->date->year().'&lt;br&gt;'; // prints four digit year.

?&gt;
</pre>

{/literal}